package com.perfma.xtest.tool.word;

import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

/**
 * @author: junhui.si
 * @date: 2021-08-09 16:55
 **/
public class DateDemo {
    public static final String NAME_SPLIT = "&&";

    public static void main(String[] args) {
//        System.out.println(TimeZone.getDefault());
//        System.out.println(new Date());
//        String name = "哈哈哈&&123";
//        name = name.contains(NAME_SPLIT) ? name.substring(0, name.indexOf(NAME_SPLIT)) : name;
//
//        System.out.println(name + NAME_SPLIT + System.currentTimeMillis());
//
//        name = name.contains(NAME_SPLIT) ? name.substring(0, name.indexOf(NAME_SPLIT)) : name;
//        System.out.println(name + NAME_SPLIT + System.currentTimeMillis());
        Calendar calendar = Calendar.getInstance();
        calendar.set(2018, Calendar.SEPTEMBER, 1);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        long EPOCH = calendar.getTimeInMillis();
        System.out.println(EPOCH);
        System.out.println("----------------");

        Number n = ((1628778297896L - EPOCH) << 20) | (480 << 12) ;
        System.out.println(n);
        System.out.println("----------------");

        n = ((1628778297897L - EPOCH) << 20) | (480 << 12) ;
        System.out.println(n);
        System.out.println("----------------");

        System.out.println(((1628778297896L - EPOCH) << 20));
        System.out.println(((1628778297897L - EPOCH) << 20));
        System.out.println(480 << 12);
    }
}
